import request from '@/utils/request'

// 区域管理
export const search = data => request.get('/api/vm-service/region/search', {
  params: {
    ...data
  }
})
// 获取区域详情
export const region = (regionId, data) => request.get(`/api/vm-service/region/${regionId}`, {
  Headers: { 'Content-Type': 'application/json' },
  params: {
    ...data
  }
})

// 新增
export const add = data => request.post('/api/vm-service/region', {
  // Headers: { 'Content-Type': 'application/json' },
  ...data
})
// 修改
export const revise = (data) => request.put(`/api/vm-service/region/${data.id}`,
  {
    regionName: data.regionName,
    remark: data.remark
  }
)
// 删除
export const deletes = id => request.delete(`/api/vm-service/region/${id}`)

// 查看(点位管理)
export const node = data => request.get('/api/vm-service/node/search', {
  params: {
    ...data
  }
})
